Repository navigation
2.0: Hide Pekko types from the embedding API, move the server into its module - #1275
Merged
Merged
Conversation
…module - TheSQSRestServerBuilder is no longer a case class: its constructor, fields and copy are private, so new options no longer break binary compatibility. - withQueueEventListener takes a QueueEventListener trait (callbacks with QueueData/MessageData) instead of an ActorRef; withQueueManagerActor is internal. withActorSystem stays public. - SQSRestServer.waitUntilStarted returns SQSRestServerBinding instead of Pekko's Http.ServerBinding; stopAndGetFuture returns Future[Unit]. - ElasticMQServer, ElasticMQServerConfig and the server reference.conf move to the server module; rest-sqs now depends only on persistence-core. - Fix the builder Scaladoc (default limits are strict) and the performance tests compilation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the "Embedding API (
elasticmq-rest-sqs)" items fromdocs/BACKLOG.md.Changes
TheSQSRestServerBuilderis no longer a case class. Its constructor, fields andcopyare private; configuration goes throughSQSRestServerBuilder.withX(...)only, so new options no longer break binary compatibility.withActorSystem(ActorSystem), which stays: the HTTP layer needs an actor system anyway, and users who pass their own already depend on Pekko.withQueueEventListenertakes a newQueueEventListenertrait instead of anActorRef. It has optional callbacks (queueCreated,queueDeleted,queueMetadataUpdated,messageAdded,messageUpdated,messageRemoved) that receiveQueueData/MessageData. They are called one at a time; the message callbacks finish before the SQS response is sent. Exceptions are logged and ignored.withQueueManagerActoris nowprivate[elasticmq], used only byElasticMQServerand the SQL persistence tests.SQSRestServer.waitUntilStarted()returnsSQSRestServerBinding(localAddress)instead of Pekko'sHttp.ServerBinding.SQSRestServeris no longer a case class, andstopAndGetFuture()returnsFuture[Unit].ElasticMQServer,ElasticMQServerConfig, their test and the serverreference.confmove to theservermodule (same packages).elasticmq-rest-sqsnow depends only onpersistence-core, not onpersistence-file/persistence-sql(H2, ScalikeJDBC, PureConfig).performance-testscompile again (a missing type annotation broke them on both Scala versions).Breaking changes for embedders
TheSQSRestServerBuilder(...)constructor,copyor its fields.withQueueEventListener(ActorRef)→ implementQueueEventListener.withQueueManagerActorremoved from the public API, so persistence can no longer be wired into the builder. AwithPersistence(...)option can follow in a 2.x minor if needed.waitUntilStarted().localAddressis nowjava.net.InetSocketAddressonSQSRestServerBinding.ElasticMQServerrequires theelasticmq-serverartifact.Testing
QueueEventListenerTests: every callback against a real server, and a listener that throws.sbt teston Scala 2.13. On Scala 3:server,restSqs, plus the listener, SQL persistence and auto-create integration tests.server/assemblyjar started withserver/docker/elasticmq.conf: health check andListQueueswork; the mergedreference.confcontains both the rest-sqs and server sections.🤖 Generated with Claude Code